package com.example.demo004;

import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("用户")
public class User {

    @ApiModelProperty(value = "用户ID", required = true)
    private Long id;

    @NotNull(message = "用户名不能为空")
    @ApiModelProperty("用户名称")
    private String name;

    @ApiModelProperty("用户年龄")
    private Integer age;
}
